let Id;
var $;
var from;
let weid;
let name;
layui.use(['form', 'colorpicker', 'layer'], function () {
    $ = layui.$;
    from = layui.form;
})

function child(wellid, id, dep, desc, dbname) {
    weid = wellid;
    Id = id;
    name = dbname;
    $("#dep").val(dep)
    $("#dc").val(desc);
}
var resdate = function () {
    let dep = $("#dep").val();
    let dc = $("#dc").val();
    // var getoken = GetToken(dataobj);
    let relt;
    $.ajax({
        type: "post",
        url: api_address + "/gd/Updatedescdate?wellid=" + weid + "&dbname=" + name + "&id=" + Id + "&Depth=" + dep + "&desc=" + dc,
        contentType: 'application/json;',
        async: false,
        headers: {
            Authorization: getoken
        },
        success: function (res) {
            var resdata = JSON.parse(res);
            if (resdata.code == 200) {
                relt = 200;
            }
        }
    })
    return relt;
}